
## Created by Anjuta

CC = gcc
CFLAGS = -g -Wall -fPIC
OBJECTS = statistics.o statistics_wrap.o
INCFLAGS = -I/usr/include/python2.6
LDFLAGS = -fPIC -shared
LIBS = -lsqlite3
LD = ld

all: _statistics.so

statistics.o: statistics.c 
	$(CC) -c statistics.c $(CFLAGS) -o statistics.o $(INCFLAGS)

statistics_wrap.c: statistics.i 
	swig -python statistics.i
    
statistics_wrap.o: statistics_wrap.c 
	$(CC) -c statistics_wrap.c $(CFLAGS) -o statistics_wrap.o $(INCFLAGS)

_statistics.so: $(OBJECTS) 
	$(LD) -o _statistics.so $(OBJECTS) $(LDFLAGS) $(LIBS)

.SUFFIXES:
.SUFFIXES:	.c .cc .C .cpp .o

.c.o :
	$(CC) -o $@ -c $(CFLAGS) $< $(INCFLAGS)

count:
	wc *.c *.cc *.C *.cpp *.h *.hpp

clean:
	rm -f *.o

.PHONY: all
.PHONY: count
.PHONY: clean
